3.220 \(\int (B \cos (c+d x)+C \cos ^2(c+d x)) \sec (c+d x) \, dx\)

Optimal. Leaf size=15 \[ B x+\frac{C \sin (c+d x)}{d} \]

[Out]

B*x + (C*Sin[c + d*x])/d

________________________________________________________________________________________

Rubi [A]  time = 0.0296575, antiderivative size = 15, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.077, Rules used = {3010, 2637} \[ B x+\frac{C \sin (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x],x]

[Out]

B*x + (C*Sin[c + d*x])/d

Rule 3010

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x
_Symbol] :> Dist[1/b, Int[(b*Sin[e + f*x])^(m + 1)*(B + C*Sin[e + f*x]), x], x] /; FreeQ[{b, e, f, B, C, m}, x
]

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx &=\int (B+C \cos (c+d x)) \, dx\\ &=B x+C \int \cos (c+d x) \, dx\\ &=B x+\frac{C \sin (c+d x)}{d}\\ \end{align*}

Mathematica [A]  time = 0.0083274, size = 26, normalized size = 1.73 \[ B x+\frac{C \sin (c) \cos (d x)}{d}+\frac{C \cos (c) \sin (d x)}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x],x]

[Out]

B*x + (C*Cos[d*x]*Sin[c])/d + (C*Cos[c]*Sin[d*x])/d

________________________________________________________________________________________

Maple [A]  time = 0.026, size = 21, normalized size = 1.4 \begin{align*}{\frac{C\sin \left ( dx+c \right ) +B \left ( dx+c \right ) }{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*cos(d*x+c)+C*cos(d*x+c)^2)*sec(d*x+c),x)

[Out]

1/d*(C*sin(d*x+c)+B*(d*x+c))

________________________________________________________________________________________

Maxima [A]  time = 1.29137, size = 27, normalized size = 1.8 \begin{align*} \frac{{\left (d x + c\right )} B + C \sin \left (d x + c\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*cos(d*x+c)+C*cos(d*x+c)^2)*sec(d*x+c),x, algorithm="maxima")

[Out]

((d*x + c)*B + C*sin(d*x + c))/d

________________________________________________________________________________________

Fricas [A]  time = 1.59613, size = 38, normalized size = 2.53 \begin{align*} \frac{B d x + C \sin \left (d x + c\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*cos(d*x+c)+C*cos(d*x+c)^2)*sec(d*x+c),x, algorithm="fricas")

[Out]

(B*d*x + C*sin(d*x + c))/d

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (B + C \cos{\left (c + d x \right )}\right ) \cos{\left (c + d x \right )} \sec{\left (c + d x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*cos(d*x+c)+C*cos(d*x+c)**2)*sec(d*x+c),x)

[Out]

Integral((B + C*cos(c + d*x))*cos(c + d*x)*sec(c + d*x), x)

________________________________________________________________________________________

Giac [B]  time = 1.34348, size = 53, normalized size = 3.53 \begin{align*} \frac{{\left (d x + c\right )} B + \frac{2 \, C \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*cos(d*x+c)+C*cos(d*x+c)^2)*sec(d*x+c),x, algorithm="giac")

[Out]

((d*x + c)*B + 2*C*tan(1/2*d*x + 1/2*c)/(tan(1/2*d*x + 1/2*c)^2 + 1))/d